/**
 * 
 */
package it.battlehorse.scripting.view;

import static it.battlehorse.scripting.ScriptingActivator.PLUGIN_ID;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;

import org.eclipse.jface.action.Action;

/**
 * This action refreshes a scripted view reloading the script file
 * @author battlehorse
 *
 */
public class RefreshAction extends Action {

	private ScriptProxyView view; 

	
	public RefreshAction(ScriptProxyView view) {
		super("Refresh script");
		this.view = view;
		this.setImageDescriptor(imageDescriptorFromPlugin(PLUGIN_ID, "icons/refresh.png"));
				
		this.setToolTipText("Refresh script");				
	}
	
	@Override
	public void run() {
		view.refresh();
	}
	
}
